package fr.insee.sicape.bean;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class Reponse implements Iterable<Echo>{

	private String infoPassives, codeRetour;
	private List<Echo> echos;
	
	public Reponse() {
		super();
		echos = new ArrayList<Echo>(5);
	}

	public String getInfoPassives() {
		return infoPassives;
	}

	public void setInfoPassives(String libelle) {
		this.infoPassives = libelle;
	}

	public String getCodeRetour() {
		return codeRetour;
	}

	public void setCodeRetour(String codeRetour) {
		this.codeRetour = codeRetour;
	}

	public List<Echo> getEchos() {
		return echos;
	}

	public void setEchos(List<Echo> echos) {
		this.echos = echos;
	}

	@Override
	public Iterator<Echo> iterator() {
		return echos.iterator();
	}
	
	public void add(Echo echo){
		this.echos.add(echo);
	}
	
	public int size(){
		return echos.size();
	}
}
